package List_;

import java.util.Scanner;

public class TestCompany {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        Company a = new Company("子梅自行车专卖", "天水路123号", "售卖自行车", "18715178256");

        while (true) {
            System.out.println("*******************");
            System.out.println("1.添加公司员工");
            System.out.println("2.显示员工信息");
            System.out.println("3.显示公司信息");
            System.out.println("4.显示公司总人数");
            System.out.println("5.辞退员工");
            System.out.println("6.查找薪水最高的员工");
            System.out.println("0.输入0退出");
            System.out.println("请输入您的选择");
            int chioce = input.nextInt();
            switch (chioce) {
                case 1:
                    System.out.println("请输入员工姓名");
                    String name = input.next();
                    System.out.println("请输入员工年龄");
                    int age = input.nextInt();
                    System.out.println("请输入员工性别");
                    String sex = input.next();
                    System.out.println("请输入员工职务");
                    String post = input.next();
                    System.out.println("请输入员工工资");
                    double salary = input.nextDouble();
                    a.add(name, age, sex, post, salary);
                    break;
                case 2:
                    a.showCompany();
                    break;
                case 3:
                    a.showstaff();
                    break;
                case 4:
                    a.shows();
                    break;
                case 5:
                    System.out.println("请输入您要辞退的员工姓名");
                    String name1 = input.next();
                    a.fire(name1);
                    break;
                case 6:
                    a.findTopSalary();
                    break;
                default:
                    break;

            }
            if (chioce == 0) {
                System.out.println("退出系统");
                break;
            }
        }


    }
}
